﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LS.Entitys;
using LS.Common;

namespace LS.Cores
{
    /// <summary>
    /// 提供字典管理服务
    /// </summary>

    public class SysDictionaryService : BaseService<SysDictionaryEntity> ,ISysDictionary
    {
        #region 实现接口方法
        
       
        public int DeleteType(string dicids)
        {
            string sql = "update   sys_dictionary set isdel=1 where id in("+ dicids + ") or ParentId in ("+ dicids + ")";
            return SqlHelper.Execute(sql);

        }

        public int ModifyState(long id, int state)
        {
            string sql = $"update   sys_dictionary set isenable={state} where id ={id}";
            return SqlHelper.Execute(sql);
        }
        #endregion 实现接口方法
    }
}
